import './assets/main.scss'

import { createApp } from 'vue'
import Elment from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router'

import Echarts from 'vue-echarts'
import * as echarts from 'echarts'
// 导入图标文件
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)
app.use(Elment)
app.use(router)

// 全局挂载
app.component('e-chart', Echarts)
app.config.globalProperties.$echarts = echarts
app.mount('#app')

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
